package com.p2p.auth.service.remote;

import com.p2p.auth.controller.Routes;
import com.p2p.auth.service.hystrix.ProductRemoteHystrix;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;

/**
 *
 * @author lipei
 * @date 2018/3/3
 */
@FeignClient(name= "PROD-SERVER" , fallback = ProductRemoteHystrix.class)
@Component
public interface IProductRemote {


    @RequestMapping(value = Routes.INSIDE_RETAILERS_GET_MSG_BY_RETAILERID, method = RequestMethod.POST)
    @ResponseBody
    HashMap getRetailersMsgByRetailerId(@RequestBody String retailerId);


    @RequestMapping(value = Routes.INSIDE_RETAILERS_GET_MSG_BY_RETAILERNO, method = RequestMethod.POST)
    @ResponseBody
    HashMap getRetailersMsgByRetailerNo(@RequestBody String retailerId);


}
